package com.huaxin.device.dto.request;

import com.huaxin.hxenum.validation.ValidDeviceType;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

@Data
public class UpdateDeviceModelReqDTO {

    /**
     * 型号ID
     */
    @NotBlank(message = "ID不能为空")
    @Schema(description = "型号ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "123e4567-e89b-12d3-a456-426614174000")
    private String id;

    /**
     * 设备类型
     */
    @NotBlank(message = "设备类型不能为空")
    @Schema(description = "设备类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "circuit_breaker")
    @ValidDeviceType
    private String deviceType;

    /**
     * 设备默认命名模板
     */
    @Schema(description = "设备默认命名模板", example = "{zone}断路器{no}")
    private String deviceNameTemplate;

    /**
     * 预期寿命（月）
     */
    @Schema(description = "预期寿命（月）", example = "60")
    private Integer expectedLifespanMonths;

    /**
     * 描述
     */
    @Schema(description = "描述", example = "高性能断路器，适用于厨房电路")
    private String description;

    /**
     * 技术参数（JSON）
     */
    @Schema(description = "技术参数", example = "{\"rated_current\": \"20A\", \"protocol\": \"Modbus\"}")
    private String specs;

    /**
     * 组织家族ID
     */
    @Schema(description = "组织家族ID", example = "f3b2f8e1-4c5d-4e6f-8b2a-1c2d3e4f5a6b")
    private String familyId;
}